revealer: Handle child-visible properly
authorBenjamin Otte <otte@redhat.com>
Tue, 8 Jan 2019 00:29:41 +0000 (01:29 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 8 Jan 2019 00:29:41 +0000 (01:29 +0100)
The target position is irrelevant for determining if the child should be
visible. When the current position is 0, it needs to be hidden, period.

Fixes #1355

gtk/gtkrevealer.c

index d1245d22fbe383762e39e226a6dc47901515092b..508c7d2127acdedef0e9c1681701fd799f23b6f2 100644 (file)
@@ -390,12 +390,7 @@ gtk_revealer_set_position (GtkRevealer *revealer,
 
   priv->current_pos = pos;
 
-  /* We check target_pos here too, because we want to ensure we set
-   * child_visible immediately when starting a reveal operation
-   * otherwise the child widgets will not be properly realized
-   * after the reveal returns.
-   */
-  new_visible = priv->current_pos != 0.0 || priv->target_pos != 0.0;
+  new_visible = priv->current_pos != 0.0;
 
   child = gtk_bin_get_child (GTK_BIN (revealer));
   if (child != NULL &&